<include file="Public:header" />

<div id="page-body">
    <div id="qan-breadcrumbs"><span><a href="{$_global.site_url}">{$Think.lang.home}</a></span>&gt;&nbsp;<span><a href="{:U('Team/index')}">{$Think.lang.all_teams}</a></span><notempty name="category">&gt;&nbsp;</notempty><span>{$breadCrumbs}</span></div>
    <div id="qan-content">
        <empty name="keyword">
    	<div id="qan-categories" class="container">
            <notempty name="cateID"><h1 class="category-{$cateID}">{$cateID|get_category_name}</h1></notempty>
            <ul class="bd">
                <volist name="subCategories" id="vo">
                <eq name="vo.category_id" value="$cateID">
                <li><span class="current">{$vo.name}</strong><eq name="_global['display_category_count']" value="1"><span class="count">({$vo.question_count})</span></eq></li>
                <else/>
                <li><a href="{:U('Team/index',array('cid'=>$vo['category_id']))}">{$vo.name}</a><eq name="_global['display_category_count']" value="1"><span class="count">({$vo.question_count})</span></eq></li>
                </eq>
                </volist>
            </ul>
        </div>
        </empty>
        <notempty name="teams">
        <ul class="teams">
            <volist name="teams" id="vo" mod="2">
            <li class="item <eq name="mod" value="0">alt</eq>">
                <div class="logo"><a href="{$vo.team_id|format_team_url=$vo['name']}"><img src="{$vo.logo}" alt="{$vo.name|Input::forShow}" /></a></div>
                <div class="info">
                    <h3><a href="{$vo.team_id|format_team_url=$vo['name']}">{$vo.name|Input::forShow}</a></h3>
                    <ul class="meta">
                        <li>{$Think.lang.created_by} <a href="{$vo.leader_id|format_user_url=$vo['leader_rname']}">{$vo.leader_name}</a> - </li>
                        <li>{$Think.lang.in} <a href="{$vo.category_id|format_category_url}">{$vo.category_id|get_category_name}</a> - </li>
                        <li>{$vo.answer_count} {$Think.lang.answer_count} - </li>
                        <li><abbr title="{$vo.create_time|format_date}">{$vo.create_time|pretty_date}</abbr></li>
                    </ul>
                    <ul class="tag"><li><a href="#">google</a></li><li><a href="#">facebook</a></li><li><a href="#">yahoo</a></li></ul>
                </div>
            </li>
            </volist>
        </ul>
        <div class="pagination">{$pagination}</div>
        <else/>
        <p>{$Think.lang.no_team}</p>
        </notempty>
    </div>
    <div id="qan-sidebar">
        <!-- my teams -->
        <div class="leaderboard mod">
        	<h2>{$Think.lang.my_teams}</h2>
        	<div class="hd">{$Think.lang.user_best_answer_count}</div>
		    <div class="bd">
		        <table>
		            <volist name="myTeams" id="vo">
		            <tr>
		                <td class="position">{$key+1}</td>
		                <td class="avatar"><a href="{$vo.team_id|format_team_url=$vo['name']}"><img src="{$vo.logo}" alt="{$vo.name}" /></a></td>
		                <td><a href="{$vo.user_id|format_user_url=$vo['name']}">{$vo.name}</a></td>
		                <td class="best-answers" title="{$Think.lang.best_answer_count}">{$vo.best_answer_count}</td>
		            </tr>
		            </volist>
		        </table>
		    </div>
		    <div class="ft"><a href="{:U('Team/add')}">{$Think.lang.create_team}</a></div>
        </div>
        <!-- sidebar top ad -->
        <div id="ad_team_sidebar_top">{ad:team_sidebar_top}</div>
        <!-- top category teams widget -->
        {:W('TopCategoryTeams',array('cid'=>$cateID))}
        <!-- team search -->
        <div id="team-search" class="mod">
        	<form method="POST" action="{:U('Team/index')}">
        	<h2>{$Think.lang.team_search}</h2>
        	<p><input class="input" type="text" name="keyword" size="35" value="{$keyword}" /> <input type="submit" value="{$Think.lang.search}" /></p>
        	</form>
        </div>
        <!-- like this page -->
        <div id="qan-persistent-links" class="mod">
            <h2>{$Think.lang.user_like_page}</h2>
            <ul class="syndication-links">
                <li class="rss"><a href="{:U('Feed/team',array('cid'=>$cateID))}">{$Think.lang.rss}</a></li>
                <li class="invite"><a href="{:U('Invitation/inviteFriend',array('uid'=>$_user['user_id']))}">{$Think.lang.invite_friends}</a></li>
            </ul>
            <!-- add this widget -->
            {:W('AddThis')}
        </div>
        <!-- sidebar bottom ad -->
        <div id="ad_team_sidebar_bottom">{ad:team_sidebar_bottom}</div>
    </div>
</div>

<include file="Public:footer" />
